<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<title>具有JavaScript特色的单例模式</title>
</head>
<body>
	
<script>
	// function getById(id) {
	// 	return document.getElementById(id);
	// }
	// function getByTagName(tagName) {
	// 	return document.getElementsByTagName(tagName);
	// }
	// function getByClassName(className) {
	// 	return document.getElementsByClassName(className);
	// }


	// var Alex = {};
	// Alex.getById = function () {};
	// ....

	// var Zhangsan = {};
	// Zhangsan.xxx = {};

	// $().xxx
	// $.xxx

	var Alex = {};
	Alex.dom = {};
	Alex.dom.getById = function () {};
	...
	Alex.string = {};
	Alex.string.trim = function () {};
	...
	Alex.reg = {};
	Alex.reg.email = //;
	Alex.tel.email = //;

</script>

</body>
</html>